from flask_httpauth import HTTPTokenAuth
from itsdangerous import TimedJSONWebSignatureSerializer as Serializer,BadSignature,SignatureExpired
from plantmanagement import settings
auth = HTTPTokenAuth(scheme='JWT')

@auth.verify_token
def verify_token(token):
    s = Serializer(settings.SECRET_KEY)
    data = s.loads(token)
    return True